<template>
	<view>
		<!-- <scroll-view scroll-y="true" >
			<view> -->
		<view class="good-list">
			<view class="goodlist-item-box flex-j-sb-as-fc" v-for="(goodItem,index) in 10" :key="index"
				@click="toGoodDetail(goodItem)">
				<u-lazy-load class="goodlist-img" :image="image" threshold="300"></u-lazy-load>
				<view class="good-list-item-bottom-box">
					<view class="good-text-top-box">
						<text class="text-24-0f0f0f-b">复古蓝色皮衣</text>
					</view>
					<view class="good-text-bottom-box flex-j-sb-ac">
						<text class="text-28-0f0f0f-b">￥999.00</text>
						<block>
							<view v-if="styleType" class="good-item-bottom-right-box flex-jc-ac">
								<text>+</text>
							</view>
							<view v-else class="good-text-box flex-ac">
								<u-icon v-if="scStatus" name="heart-fill"></u-icon>
								<u-icon v-else name="heart"></u-icon>
								<text class="text-20-0F0F0F">1.2 W人</text>
							</view>
						</block>
					</view>
				</view>
			</view>
		</view>
		<!-- 		</view>
		</scroll-view> -->
	</view>
</template>

<script>
	export default {
		props: {
			scStatus: {
				type: Boolean,
				default: false
			},
			styleType: {
				type: Boolean,
				default: true
			}
		},
		data() {
			return {
				collectStatus: true,
				image: "https://gtd.alicdn.com/sns_logo/i1/TB124_3NXXXXXasXVXXSutbFXXX.jpg_240x240xz.jpg",
			}
		},
		methods: {
			toGoodDetail(e) {
				this.$emit("toGoodDetail", e)
			}
		}
	}
</script>

<style>
	page {
		background-color: #F5F4F2;
	}

	.good-list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		justify-items: center;
		column-gap: 20rpx;
		margin-left: 25rpx;
		margin-right: 25rpx;
	}

	.goodlist-item-box {
		height: 486rpx;
		width: 340rpx;
		background-color: #FFFFFF;
		margin-bottom: 20rpx;
		border-radius: 10rpx;
		margin-top: 10rpx;
	}

	.goodlist-img {
		height: 340rpx;
		width: 340rpx;
	}

	.good-text-top-box {
		margin-top: 20rpx;
		margin-left: 20rpx;
		margin-right: 20rpx;
	}

	.good-list-item-bottom-box {
		flex: 1;
		width: 100%;
	}

	.good-text-bottom-box {
		margin-top: 20rpx;
		margin-left: 20rpx;
		margin-right: 20rpx;
	}

	.good-text-box>:nth-child(2) {
		margin-left: 10rpx;
	}

	.good-item-bottom-right-box {
		width: 36rpx;
		height: 36rpx;
		background-color: #F5CC4B;
		border-radius: 5rpx;
	}
</style>
